#coding:utf-8
class SchoolMem:
	def __init__(self,name,sex,age):
		self.name = name
		self.sex = sex
		self.age = age
	def __getattr__(self, name):
		return "没有该属性"
	def __setitem__(self, name, value):
		self.name=value
	def __getattr__(self, sex):
		return "没有该属性"
	def __setitem__(self, sex, value):
		self.sex=value
	def __getattr__(self, age):
		return "没有该属性"
	def __setitem__(self, age, value):
		self.age=value
	def printInfo(self):
		print '\n'.join(['%s:%s' % item for item in self.__dict__.items()])
class Student(SchoolMem):
	def __init__(self,name,sex,age,ban,num,tong):
		SchoolMem.__init__(self,name,sex,age)
		self.ban = ban
		self.num = num
		self.tong = tong
class Teacher(SchoolMem):
	def __init__(self,name,sex,age,ke,num,tong):
		SchoolMem.__init__(self,name,sex,age)
		self.ke = ke
		self.num = num
		self.tong = tong
x = SchoolMem('333','333',333)
y = Student('ccc','ddd',9,'daasd',898,7877)
z = Teacher('111','111',1,'111',111,111)
x.printInfo()
print " "
y.printInfo()
print " "
z.printInfo()
